/*
 * Middleware
 * Copyright (C) 2010/11
 * Riccardo Pulvirenti, Giuseppe Ravidà, Andrea Tino
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses
 */

/*!
 * File: worker_descriptor_test.hpp
 */

#ifndef _WORKER_DESCRIPTOR_TEST_HPP_
#define _WORKER_DESCRIPTOR_TEST_HPP_

#include <iostream>
#include <sstream>
#include "worker_descriptor.hpp"

using namespace std;
namespace middleware {

//-----------------------------------------------------------------------------
// Definitions
/*!
 * Test function for TaskDescriptor
 */
void WorkerDescriptorTest();
//-----------------------------------------------------------------------------
// Implementations
void WorkerDescriptorTest() {
	WorkerCapabilities wc;
	WorkerDescriptor wd;
	wc.capab_bandwidth = 100;
	wc.capab_core_num = 2;
	wc.capab_cpu_mhz = 1000;
	wc.capab_cpu_num = 2;
	wc.capab_hops = 10;
	wc.capab_ram_mb = 1024;
	wd.set_capabilities(wc);

	WorkerDescriptor wd1;
	wd1.set_capabilities(wc);

	bool is = (wd == wd1);

	cout << "PI is: " << wd.PI() << endl;
	cout << "Equal?: " << is << endl;
}

} /* Middleware */
#endif
